﻿using System;

namespace Pixysoft.Framework.Security
{
    public interface ISecurityManager
    {
        SecurityResult ChangePassword(string userName, string oldPwd, string newPwd);

        Pixysoft.Framework.Security.Entity.User GetLoginUser();

        bool HasPermission(Pixysoft.Framework.Security.Entity.User user, string permissionname);

        bool IsLogined();

        bool IsPermitted(Pixysoft.Framework.Security.Entity.User user, string resourceName);

        SecurityResult Login(string userName, string pwd);

        void Logout();

        Pixysoft.Framework.Security.Entity.User Register(string userName, string pwd);
    }
}
